from django.forms import ModelForm, Textarea
from django.utils.translation import ugettext_lazy as _


from rates.models import Rate


class RateForm(ModelForm):
	"""docstring for RateForm"""
	def __init__(self, *args, **kwargs):
		super(RateForm, self).__init__(*args, **kwargs)
		self.fields['title'].required = True
		self.fields['body'].required = True
		self.fields['rate'].required = True


	class Meta:
		model = Rate

		fields = ('title', 'body', 'rate')

		labels = {
			'title' : _('Comment Title'),
			'body' : _('Comment Body'),
			'rate' : _('Rate'),
		}

		widgets = {
			'body': Textarea(attrs={'cols': 80, 'rows': 5}),
		}
